package com.gnerv.battle.boot.project.guard.model.bo;

import com.gnerv.battle.boot.common.tools.DateTimeTools;
import com.gnerv.battle.boot.project.guard.model.entity.MonitorProject;
import lombok.Data;
import org.springframework.beans.BeanUtils;


@Data
public class MonitorProjectBO {

    private String ukId;
    private String name;
    private String status;
    private Integer sort;

    public MonitorProject toCreateMonitorProject(){
        MonitorProject monitorProject = new MonitorProject();
        BeanUtils.copyProperties(this,monitorProject);
        monitorProject.setGmtCreate(DateTimeTools.currentTimeMillis());
        monitorProject.setGmtModified(DateTimeTools.currentTimeMillis());
        return monitorProject;
    }

    public MonitorProject toUpdateMonitorProject(){
        MonitorProject monitorProject = new MonitorProject();
        BeanUtils.copyProperties(this,monitorProject);
        monitorProject.setGmtModified(DateTimeTools.currentTimeMillis());
        return monitorProject;
    }

}

